package com.le.tester.javaThink.fifth.chapter14_StreamingProgramming;

import java.util.Arrays;

/**
 * 描述：stream产生了intStream,longStream,doubleStream
 */
public class ArrayStreams {
    public static void main(String[] args) {
        Arrays.stream(new double[]{3.14159, 2.718, 1.618})
                .forEach(o -> System.out.format("%f ", o));
        System.out.println("=======================");

        Arrays.stream(new int[]{1, 3, 5})
                .forEach(o -> System.out.format("%d ", o));
        System.out.println("=======================");

        Arrays.stream(new long[]{11, 22, 44, 66})
                .forEach(o -> System.out.format("%d ", o));
        System.out.println("=======================");

        //选择取值得范围
        Arrays.stream(new int[]{1, 3, 57, 15, 7, 28, 37}, 3, 6)
                .forEach(o -> System.out.format("%d ", o));
    }
}
